<template>
  <view>
    <ProductGrid 
      :products="productList"
      @item-click="handleProductClick"
    />
  </view>
</template>

<script>
import ProductGrid from './xztdemo6.vue'

export default {
  components: {
    ProductGrid
  },
  data() {
    return {
      productList: [
        {
          id: 1,
          title: "臻味-1.01kg环球臻果",
          price: 219,
          image: "https://safood-1317438654.cos.ap-guangzhou.myqcloud.com/tempImage/1733991310675a9b8e1e838.png",
        }, {
          id: 1,
          title: "臻味-1.01kg环球臻果",
          price: 219,
          image: "https://safood-1317438654.cos.ap-guangzhou.myqcloud.com/tempImage/1733991310675a9b8e1e838.png",
        },
		{
		  id: 1,
		  title: "臻味-1.01kg环球臻果",
		  price: 219,
		  image: "https://safood-1317438654.cos.ap-guangzhou.myqcloud.com/tempImage/1733991310675a9b8e1e838.png",
		}
        // ... 其他商品数据 ...
      ],
    };
  },
  methods: {
    handleProductClick(item) {
      // 处理商品点击事件
      console.log('商品被点击:', item)
    }
  }
};
</script>